/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package basecontrollcenter.gui;

import basecontrollcenter.gui.elements.ClockComponent;
import basecontrollcenter.gui.elements.InfoComponent;
import basecontrollcenter.gui.elements.StatusListComponent;
import basecontrollcenter.gui.elements.TimeInfoComponent;
import basecontrollcenter.gui.elements.TimePlanComponent;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 *
 * @author rbs
 */
public class MainFrame extends JFrame{

    private TimeInfoComponent timeInfoComponent;
    private InfoComponent infoComponent;
    private StatusListComponent statusListComponent;
    private TimePlanComponent timePlanComponent;
    private ClockComponent clockComponent;
    
    public MainFrame() {
        
        timeInfoComponent = new TimeInfoComponent();
        infoComponent = new InfoComponent();
        statusListComponent = new StatusListComponent();
        timePlanComponent = new TimePlanComponent();
        clockComponent = new ClockComponent();
        
        setMinimumSize(new Dimension(500, 500));
        setPreferredSize(new Dimension(500, 500));
        setLayout(new GridBagLayout());
        
        GridBagConstraints c = new GridBagConstraints();
        
        c.fill = GridBagConstraints.BOTH;
        c.gridx = 0;
        c.gridy = 0;
        c.weighty = 0.1;
        c.weightx = 0.5;
        
        add(timeInfoComponent, c);
        
        c.fill = GridBagConstraints.BOTH;
        c.gridx = 1;
        c.gridy = 0;
        c.weighty = 0.1;
        c.weightx = 0.5;
        
        add(clockComponent, c);
        
        c.fill = GridBagConstraints.BOTH;
        c.gridx = 2;
        c.gridy = 0;
        c.weighty = 0.1;
        c.weightx = 0.5;
        
        add(infoComponent, c);
        
        
        //Secound Row:
        c.fill = GridBagConstraints.HORIZONTAL;
        c.gridx = 0;
        c.gridy = 1;
        c.gridwidth = 3;
        c.weighty = 0.1;
        
        add(statusListComponent, c);
        
        
        //Third Row:
        c.fill = GridBagConstraints.BOTH;
        c.gridx = 0;
        c.gridy = 2;
        c.gridwidth = 3;
        c.weighty = 0.8;
        
        add(timePlanComponent, c);
        
        setVisible(true);
    }
    
}
